<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
/*
return [
     '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['wap/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['wap/hello', ['method' => 'post']],
    ],
];
*/
use think\Route;
//Route::get('api/wap','api/Index/wap'); // 定义GET请求路由规则
//Route::get('api/wap/:id','api/Index/read'); // 定义GET请求路由规则
//Route::post('api/wap','api/Index/update'); // 定义POST请求路由规则
//Route::delete('api/wap/:id','api/Index/delete'); // 定义DELETE请求路由规则



// +----------------------------------------------------------------------
// | api接口
// +----------------------------------------------------------------------

        Route::get('get','index/index/get');//短信

Route::group('api',function(){
    // +----------------------------------------------------------------------
    // | 短信
    // +----------------------------------------------------------------------
    Route::group('msn',function(){
        Route::post('index','api/msn/index');//短信
    });
	// +----------------------------------------------------------------------
    // | 个人中心
    // +----------------------------------------------------------------------
    Route::group('center',function(){
        Route::post('modify','api/center/modify');//修改个人资料
        Route::post('center','api/center/center');//个人资料 会员中心
        Route::post('bind','api/center/bind');//绑定手机
        Route::post('qrcode','api/center/qrcode');//个人中心二维码

        //信息提醒
        Route::post('del','api/center/del');//删除系统提醒
        Route::post('delete','api/center/delete');//删除订单提醒
        Route::post('reader','api/center/reader');//订单优惠券已读
        Route::post('read','api/center/read');//系统提醒已读
        Route::post('information','api/center/information');//订单优惠券
        Route::post('system','api/center/system');//系统提醒
        Route::post('newsdetail','api/center/newsdetail');//系统提醒
    });
	// +----------------------------------------------------------------------
    // | 卡券
    // +----------------------------------------------------------------------
    Route::group('coupon',function(){
        Route::post('white','api/coupon/white');//颜色
        Route::post('createCard','api/coupon/createCard');//创建优惠券
        Route::post('delcoupon','api/coupon/delcoupon');//删除优惠券
        Route::post('cardlist','api/coupon/cardlist');//领券中心
        Route::post('couponlist','api/coupon/couponlist');//我的优惠券
        Route::post('check','api/coupon/check');//领取优惠券
        Route::post('backMoney','api/coupon/backMoney');//优惠金额
        Route::post('detail','api/coupon/detail');//优惠券详情
        Route::post('wxdetail','api/coupon/wxdetail');//微信优惠券详情
        Route::post('deletecoupon','api/coupon/deletecoupon');//核销优惠券
    });

    // +----------------------------------------------------------------------
    // | 首页
    // +----------------------------------------------------------------------
    Route::group('index',function(){
        Route::get('about','api/index/about');//关于我们
        Route::get('banner','api/index/banner');//个人资料 会员中心
        Route::get('detail','api/index/detail');//图文详情
        Route::get('article','api/index/article');//图文列表
        Route::get('boutique','api/index/boutique');//首页精品
        Route::get('blist','api/index/blist');//精品列表
        Route::get('tell','api/index/tell');//咨询电话
        Route::get('rule','api/index/rule');//取消规则
    });
    // +----------------------------------------------------------------------
    // | 票务
    // +----------------------------------------------------------------------
    Route::group('goods',function(){
        Route::post('sort','api/goods/sortlist');//票务预订
        Route::post('index','api/goods/index');//房间等列表
        Route::post('detail','api/goods/detail');//房间等详情
        Route::post('confirm','api/goods/confirm');//确定预订房间
        Route::post('confirm_ticket','api/goods/confirm_ticket');//确定门票房间
        Route::post('confirm_package','api/goods/confirm_package');//确定门票房间

    });
    // +----------------------------------------------------------------------
    // | 订单
    // +----------------------------------------------------------------------
    Route::group('order',function(){
        Route::post('index','api/order/index');//订单列表
        Route::post('detail','api/order/detail');//订单详情
        Route::post('create_room','api/order/create_room');//房间下单
        Route::post('create_ticket','api/order/create_ticket');//门票下单
        Route::post('create_package','api/order/create_package');//套票下单
        Route::post('qrcode','api/order/qrcode');//订单二维码
        Route::post('cancel','api/order/cancel');//取消订单
        Route::post('delete','api/order/delete');//删除订单
        Route::post('refund','api/order/refund');//申请退款

    });
});



